package ubiqweb.spring3.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.SecondaryTable;
import javax.persistence.SecondaryTables;
import javax.persistence.Table;

@Entity
@Table(name = "registered_attendees")

@SecondaryTables({
		@SecondaryTable(name="user_info",
			pkJoinColumns=@PrimaryKeyJoinColumn(name="user_id")),
			
		@SecondaryTable(name = "trainings",
			pkJoinColumns=@PrimaryKeyJoinColumn(name="training_id"))
		})

public class Attendees {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "registered_id")
	private Integer registeredId;

	@Column(name = "user_id")
	private String userId;
	
	@Column(name = "training_id")
	private String trainingId;
	
	@Column(name = "payment_status")
	private String paymentStatus;
	
	@Column(name="topic", table="trainings")
	private String topic;
	
	@Column(name="status", table="trainings")
	private String status;
	
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name="last_name", table="user_info")
	private String lastName;
	
	public Attendees() {		
	}

	public Integer getRegisteredId() {
		return registeredId;
	}

	public void setRegisteredId(Integer registeredId) {
		this.registeredId = registeredId;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getTrainingId() {
		return trainingId;
	}

	public void setTrainingId(String trainingId) {
		this.trainingId = trainingId;
	}

	public String getPaymentStatus() {
		return paymentStatus;
	}

	public void setPaymentStatus(String paymentStatus) {
		this.paymentStatus = paymentStatus;
	}

	public String getTopic() {
		return topic;
	}

	public void setTopic(String topic) {
		this.topic = topic;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}


}